<template>
	<view class="content">
		页面 - 1
		<view class="upload-img">
			<image src="../../../static/img/release.png" @click="onGetImgClick"></image>
		</view>
		<image mode="widthFix" :src="src"></image>
	</view>
	
</template>

<script>
	
export default {
	data() {
		return {
			title: 'Hello',
			imageList:[],
			src: ""
		};
	},
	onLoad() {},
	
	methods: {
		onGetImgClick() {
			console.log("上传图片")
			const that = this
			uni.chooseImage({
				count: 1, // 最多可以选择的图片张数，默认9
				sizeType: ['original', 'compressed'], //original 原图，compressed 压缩图，默认二者都有
				sourceType: ['album', 'camera'], //album 从相册选图，camera 使用相机，默认二者都有。如需直接开相机或直接选相册，请只使用一个选项
				success: (res) => {
					// uni.previewImage({
					// 	urls: res.tempFilePaths
					// }),
					uni.navigateTo({
						url:'/pages/detail/detail?pic='+res.tempFilePaths+'&isTrue=true',
						success: (res) => {
								console.log("跳转成功")
						},
						fail:function(){
							console.log("跳转sb")
						}
					}),
					console.log("上传图片成功")
					
				}
			})
		}
	}
};
</script>

<style>
.content {
	text-align: center;
	height: 400upx;
	margin-top: 200upx;
},
.upload-img{
	
}
</style>
